package com.pig.dao;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pig.pojo.addr.Addr;
import com.pig.pojo.order.Order;
import com.pig.pojo.shop.Shop;
import com.pig.pojo.user.User;
import com.pig.vo.ShopTable;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;
import java.util.Map;


public interface ShopMapper extends BaseMapper<Order> {
    @Select("SELECT * FROM p_order,p_addr WHERE p_order.userId=p_addr.userId limit #{startIndex},#{limit}")
    List<ShopTable> findUserByPage(int startIndex, int limit);

    @Update("update p_order set confirmStatus=1 where orderId=#{orderId}")
    void updateById(String orderId);

    @Update("update p_order set status=1 where orderId=#{orderId}")
    void updateStatus(String orderId);
}
